import resolve from '@rollup/plugin-node-resolve'; // 解析第三方模块
import commonjs from '@rollup/plugin-commonjs';   // 将 CommonJS 模块转换为 ES6
import shebang from 'rollup-plugin-shebang';
import json from '@rollup/plugin-json';
export default {
    input: 'bin/upload-and-tag.js',  // 入口文件
    output: {
        file: 'dist/upload-and-tag.js',
        format: 'cjs',
        sourcemap: true
    },
    plugins: [
        resolve(),
        commonjs(),
        shebang(),
        json(),
    ],
    external: ['fs', 'path', 'child_process', 'util', 'os', "spawn"] // 排除 Node.js 内置模块
}